<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:p="http://primefaces.org/ui"
      xmlns:composite="http://java.sun.com/jsf/composite">

    <composite:interface>

        <composite:attribute name="returnButtonDisabled"/>
        <composite:attribute name="returnButtonAction"
                             method-signature="java.lang.String action()"/>

        <composite:attribute name="previousButtonDisabled"/>
        <composite:attribute name="previousButtonAction"
                             method-signature="java.lang.String action()"/>

        <composite:attribute name="refreshButtonDisabled"/>
        <composite:attribute name="refreshButtonAction"
                             method-signature="java.lang.String action()"/>

        <composite:attribute name="nextButtonDisabled"/>
        <composite:attribute name="nextButtonAction"
                             method-signature="java.lang.String action()"/>

        <composite:attribute name="createButtonDisabled"/>    
        <composite:attribute name="createButtonAction"
                             method-signature="java.lang.String action()"/>    

        <composite:attribute name="editButtonDisabled"/>
        <composite:attribute name="editButtonAction"
                             method-signature="java.lang.String action()"/>

        <composite:attribute name="saveButtonDisabled"/>
        <composite:attribute name="saveButtonAction"
                             method-signature="java.lang.String action()"/>

        <composite:attribute name="searchButtonDisabled"/>
        <composite:attribute name="searchButtonAction"
                             method-signature="java.lang.String action()"/>

        <composite:attribute name="printButtonRendered"/>
        <composite:attribute name="printButtonAction"
                             method-signature="java.lang.String action()"/>

        <composite:attribute name="deleteButtonDisabled"/>
        <composite:attribute name="deleteButtonAction"
                             method-signature="java.lang.String action()"/>

        <composite:attribute name="additionalInfoButtonRendered"/>

        <composite:attribute name="menuButtonRendered"/>

        <composite:attribute name="menuItem01Value"/>
        <composite:attribute name="menuItem01Action"
                             method-signature="java.lang.String action()"/> 

        <composite:attribute name="menuItem02Rendered"/>
        <composite:attribute name="menuItem02Value"/>                       
        <composite:attribute name="menuItem02Action"
                             method-signature="java.lang.String action()"/> 

        <composite:attribute name="menuItem03Rendered"/>
        <composite:attribute name="menuItem03Value"/>                       
        <composite:attribute name="menuItem03Action"
                             method-signature="java.lang.String action()"/>    

    </composite:interface>

    <p:toolbar>

        <p:toolbarGroup align="left">

            <p:commandButton id="returnButton" 
                             icon="ui-icon-return"
                             action="#{cc.attrs.returnButtonAction}"
                             update=":messages"
                             immediate="true"
                             disabled="#{cc.attrs.returnButtonDisabled}"/>

            <p:tooltip for="returnButton"
                       showEffect="fade"
                       hideEffect="fade"                 
                       value="#{bundle.Return}"/>

            <p:separator/>

            <p:commandButton id="previousButton" 
                             icon="ui-icon-previous"
                             action="#{cc.attrs.previousButtonAction}"
                             update=":messages"
                             disabled="#{cc.attrs.previousButtonDisabled}"/>

            <p:tooltip for="previousButton"
                       showEffect="fade"
                       hideEffect="fade"                 
                       value="#{bundle.Previous}"/>

            <p:commandButton id="refreshButton" 
                             icon="ui-icon-refresh"
                             action="#{cc.attrs.refreshButtonAction}"
                             update=":messages"
                             disabled="#{cc.attrs.refreshButtonDisabled}"/>

            <p:tooltip for="refreshButton"
                       showEffect="fade"
                       hideEffect="fade"
                       value="#{bundle.Refresh}"/>

            <p:commandButton id="nextButton" 
                             icon="ui-icon-next"
                             action="#{cc.attrs.nextButtonAction}"
                             update=":messages"
                             disabled="#{cc.attrs.nextButtonDisabled}"/>

            <p:tooltip for="nextButton"
                       showEffect="fade"
                       hideEffect="fade"                 
                       value="#{bundle.Next}"/>

            <p:separator/>

            <p:commandButton id="searchButton"
                             icon="ui-icon-search"
                             action="#{cc.attrs.searchButtonAction}"
                             update=":messages"
                             disabled="#{cc.attrs.searchButtonDisabled}"/>

            <p:tooltip for="searchButton"
                       showEffect="fade"
                       hideEffect="fade"                 
                       value="#{bundle.Search}"/>

            <p:separator/>

            <p:commandButton id="createButton" 
                             icon="ui-icon-document"
                             action="#{cc.attrs.createButtonAction}"
                             update=":messages"
                             disabled="#{cc.attrs.createButtonDisabled}"/>

            <p:tooltip for="createButton"
                       showEffect="fade"
                       hideEffect="fade"                 
                       value="#{bundle.Create}"/>

            <p:commandButton id="editButton" 
                             icon="ui-icon-pencil"
                             action="#{cc.attrs.editButtonAction}"
                             update=":messages"
                             disabled="#{cc.attrs.editButtonDisabled}"/>

            <p:tooltip for="editButton"
                       showEffect="fade"
                       hideEffect="fade"                 
                       value="#{bundle.Edit}"/>

            <p:commandButton id="saveButton" 
                             icon="ui-icon-disk"
                             action="#{cc.attrs.saveButtonAction}"
                             update=":messages"
                             disabled="#{cc.attrs.saveButtonDisabled}"/>

            <p:tooltip for="saveButton"
                       showEffect="fade"
                       hideEffect="fade"                 
                       value="#{bundle.Save}"/>

            <p:separator/> 

            <p:commandButton id="deleteButton"
                             icon="ui-icon-trash"
                             action="#{cc.attrs.deleteButtonAction}"
                             update=":messages"
                             disabled="#{cc.attrs.deleteButtonDisabled}">

                <p:confirm header="#{bundle.Confirmation}" 
                           message="#{bundle.DeleteRecordConfirmation}"
                           icon="ui-icon-dialog-warning"/>

            </p:commandButton> 

            <p:tooltip for="deleteButton"
                       showEffect="fade"
                       hideEffect="fade"                 
                       value="#{bundle.Delete}"/>

            <p:separator rendered="#{cc.attrs.printButtonRendered}"/>      

            <p:commandButton id="printButton" 
                             icon="ui-icon-print"
                             action="#{cc.attrs.printButtonAction}"
                             ajax="false"
                             update=":messages"
                             rendered="#{cc.attrs.printButtonRendered}"/>

            <p:tooltip for="printButton"
                       showEffect="fade"
                       hideEffect="fade"                 
                       value="#{bundle.Print}"/>   

            <p:separator rendered="#{cc.attrs.additionalInfoButtonRendered}"/> 

            <p:commandButton id="additionalInfoButton"
                             icon="ui-icon-info"
                             onclick="PF('additionalInfoDialog').show()"
                             update=":messages"
                             rendered="#{cc.attrs.additionalInfoButtonRendered}"/>

            <p:tooltip for="additionalInfoButton"
                       showEffect="fade"
                       hideEffect="fade"                 
                       value="#{bundle.AdditionalInfo}"/>      

        </p:toolbarGroup>

        <p:toolbarGroup align="right">

            <p:menuButton value="#{bundle.Info}"
                          rendered="#{cc.attrs.menuButtonRendered}">

                <p:menuitem value="#{cc.attrs.menuItem01Value}"
                            action="#{cc.attrs.menuItem01Action}"/>

                <p:menuitem value="#{cc.attrs.menuItem02Value}"
                            rendered="#{cc.attrs.menuItem02Rendered}"
                            action="#{cc.attrs.menuItem02Action}"/>  

                <p:menuitem value="#{cc.attrs.menuItem03Value}"
                            rendered="#{cc.attrs.menuItem03Rendered}"
                            action="#{cc.attrs.menuItem03Action}"/>         

            </p:menuButton>

        </p:toolbarGroup>

    </p:toolbar>

    <p:spacer/>

</html>